<?php
class Python{

     public  $url = "https://www.lottery.com";
     public  $html ;
     public function __construct(){
        $this->html = file_get_contents($this->url);
    }
     
    //采集H4标签
    public function h4(){
        preg_match_all('/<h4\sclass=\"lottery-item-title\">(.*)<\/h4>/U',$this->html,$re);
        return array_values($re[1]);
    }

    public function h3(){
        preg_match_all("/<h3 class=\"lottery-item-price\">(.*)<\/h3>/",$this->html,$re);
        return array_values($re[1]);
    }
    public function time(){
        preg_match_all('/<div\sclass=\S?lottery-item-countDate\S?\sid=\S?countdown1S?\sdata-date=\S?\d+\S?\d+\S?\d{2}\w\d{2}:\d{2}:\d{}.\d*\w?\S>(.*)<\/div>/',$this->html,$re);
        return $re;
    }
}

$url="https://www.lottery.com/jackpots/";
$html = file_get_contents($url);
//$a='<p class="center lotter-item-bonus">Megaplier : 3X</p>';

print_r($play);
